home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 33 / Amiga Format AFCD33 (Issue 117, Dec 1998).iso / -seriously_amiga- / graphics / visualengineer / arexx / closeall.rexx < prev    next >
OS/2 REXX Batch file  |  1998-09-07  |  885b  |  46 lines

  1. /*
  2.  
  3.    v1.00 Close All
  4.  
  5.    Marko Seppänen
  6.    marko.seppanen@wwnet.fi
  7.  
  8. */
  9.  
  10.  
  11. address IMAGEENGINEER
  12.  
  13. Options results
  14. signal on error            /* Setup a place for errors to go */
  15.  
  16. PROJECT_LIST
  17. list=result
  18.  
  19. if list="" then exit
  20.  
  21. kpl=words(list)
  22.  
  23. do i=1 to kpl
  24.   CLOSE subword(list,i,1)
  25. end
  26.  
  27. exit
  28.  
  29. /*******************************************************************/
  30. /* This is where control goes when an error code is returned by IE */
  31. /* It puts up a message saying what happened and on which line     */
  32. /*******************************************************************/
  33. error:
  34. if RC=5 then do            /* Did the user just cancel us? */
  35.     IE_TO_FRONT
  36.     LAST_ERROR
  37.     'REQUEST "'||RESULT||'"'
  38.     exit
  39. end
  40. else do
  41.     IE_TO_FRONT
  42.     LAST_ERROR
  43.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  44.     exit
  45. end
  46.